//
//  BKMain_GoodsTitleCell.m
//  bestkeep
//
//  Created by yons on 16/11/17.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKMain_GoodsTitleCell.h"
#import "BKMainCommon.h"

@implementation BKMain_GoodsTitleCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame: frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self initialize];
    }
    return self;
}

- (void)initialize{
    _titleImageView = [UIImageView new];
    [self addSubview:_titleImageView];
    [_titleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.mas_centerX);
        make.centerY.mas_equalTo(self.mas_centerY);
        
        
    }];
}


+(CGSize)calculateSize:(id)data{
    if(!data || ![data isKindOfClass:[NSArray class]]) {
        return CGSizeMake(0, 0);
    }
    return CGSizeMake(SCREENWIDTH, SCREENWIDTH/375*40);
}
- (void)fillData:(id)data{
    if (!data) {
        return;
    }
    
    if ([data isEqualToString:HotTitle]) {
        self.titleImageView.image = [UIImage imageNamed:@"BKMain_HOT"];
    }else{
        self.titleImageView.image = [UIImage imageNamed:@"BKMain_NEW"];
    }
    
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}



@end
